﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Partners_Default" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../../css/style.css" rel="stylesheet" type="text/css" />
    <script src="../../js/jquery-1.3.2.min.js" type="text/javascript"></script>
   <%-- <script src="../js/jquery.query.url.js" type="text/javascript"></script>--%>
</head>
<body>
    <form id="form1" runat="server">
    <div class="button_bar">
        <asp:Button ID="btnAdd" CssClass="common_button" runat="server" Text="添加" OnClientClick="document.location='add.aspx';return false;" />
        <asp:Button ID="btnSearch" CssClass="common_button" runat="server" Text="查询" 
            onclick="btnSearch_Click" />       
         
    </div>
    <table class="query_form_table">
        <tr>           
            <th align="right">
                伙伴名称：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </th>
            <td>
                <input type="text" id="txtName" runat="server" style="width:250px;" maxlength="198" />
            </td>
          
          <th align="right">
                类别：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </th>
            <td>
                <asp:DropDownList ID="ddlPid" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
    </table>
    <table class="data_list_table">
        <tr>
            <th>
                伙伴Id
            </th>
            <th>
                名称
            </th>  
            <th>
                类别
            </th>           
            <th>
                邮箱
            </th>
            <th>
                电话
            </th>
            <th>
                介绍
            </th>
            <th>
                排序
            </th>
            <th>
                是否禁用
            </th>
            <th>
                操作
            </th>
        </tr>
        <asp:Repeater ID="Repeater1" runat="server" onitemdatabound="Repeater1_ItemDataBound">
            <ItemTemplate>
                <tr>
                    <td class="list_data_number" align="center">
                        <%# Eval("Pid") %>
                    </td>
                    <td class="list_data_text">
                        <%# Eval("Pname") %>
                    </td>
                    <td class="list_data_text">
                        <asp:Label ID="lblType" runat="server" Text='<%# Eval("Padr") %>'></asp:Label>                       
                    </td>
                    <td class="list_data_text">
                        <%# Eval("Pemail")%>
                    </td>
                    <td class="list_data_text">
                        <%# Eval("Pphone") %>
                    </td>
                    <td class="list_data_ltext">
                        <%# Eval("Pdes").ToString().Replace("<br />", "").Length > 25 ? Eval("Pdes").ToString().Replace("<br />", "").Substring(0, 25) : Eval("Pdes").ToString().Replace("<br />", "")%>
                    </td>
                    <td class="list_data_text">
                        <%# Eval("SortNum") %>
                    </td>
                    <td class="list_data_text">
                    <%# Eval("Status") == null ? "<span style=\"color:red;\">禁用</span>" : (Eval("Status").ToString().ToLower() == "false" ? "<span style=\"color:red;\">禁用</span>" : "<span style=\"color:green;\">正常</span>")%>
                        <%--<asp:Label ID="lblIsEnable" runat="server" Text='<%# Eval("Status") %>'></asp:Label>--%>
                    </td>
                    <td class="list_data_ltext">
                        <a href='add.aspx?PId=<%# Eval("Pid") %>&page=<%=GetPage() %>'>
                            <img src="../../images/bt_edit.gif" alt="修改" title="修改" /></a> <a href='delete.aspx?PId=<%# Eval("Pid") %>&page=<%=GetPage() %>' onclick="return confirm('确定删除？')">
                                <img src="../../images/bt_del.gif" alt="删除" />
                            </a>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
        <tr>
            <th colspan="9" class="pager">
                <div class="pager">
                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" PageSize="10" UrlPaging="True"
                            OnPageChanged="AspNetPager1_PageChanged">
                        </webdiyer:AspNetPager>
                </div>
            </th>
        </tr>
    </table>
    </form>
</body>
</html>
